{% load i18n %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
{% get_language_info for LANGUAGE_CODE as LANG %}
{% get_available_languages as LANGUAGES %}
{% get_media_prefix as MEDIA %}

<nav id="navbar-top" class="navbar navbar-inverse {{ nav_action|default:'' }} navbar-static-top">
  <div class="container-fluid {{ nav_padding|default:'padded' }}">

    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-menu"
              aria-expanded="false">
        <span class="sr-only">{% trans 'Toggle navigation' %}</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{% url 'site_index' %}">
          <img src="{% static 'image/logo.png' %}" alt="HTE DATABASE">
      </a>
    </div>

    <div class="collapse navbar-collapse navbar-right" id="header-menu">
      <ul class="nav navbar-nav">
          <li><a href="#">{% trans 'Home' %}</a></li>
          <li><a href="#">{% trans 'Search' %}</a></li>
          <li><a href="#">{% trans 'About' %}</a></li>
          <li><a href="#">{% trans 'New Task' %}</a></li>
          <li><a href="{% url 'storage:upload_dataset' %}">{% trans '上传数据集' %}</a></li>
          <li><a href="{% url 'storage:template' %}">{% trans 'Storage' %}</a></li>
{#        <li><a href="{% url 'site_index' %}">{% trans 'Home' %}</a></li>#}
{#        <li><a href="{% url 'search:search' %}">{% trans 'Search' %}</a></li>#}
{#        <li><a href="{% url 'site_about' %}">{% trans 'About' %}</a></li>#}
{#        <li><a href="{% url 'mlplatform:index' %}">{% trans 'New Task' %}</a></li>#}
{#        <li><a href="{% url 'management:pprediction' %}">{% trans 'Performence Prediction' %}</a></li>#}
      </ul>

      <ul class="nav navbar-nav">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"
             role="button" aria-haspopup="true" aria-expanded="false">
            <i class="fa fa-globe" aria-hidden="true"></i>
            <span>{{ LANG.name_local }}</span>
          </a>
          <ul class="dropdown-menu inverse-dropdown">
            {% for lang in LANGUAGES %}
              <li>
                {% get_language_info for lang.0 as cur_lang %}
{#                <a href="{% url 'site_set_language' %}?lang={{ lang.0 }}&next={{ request.path }}">{{ lang.1 }}</a>#}

              </li>
            {% endfor %}
          </ul>
        </li>
      </ul>

{#      {% if request.user.is_authenticated %}#}
        <ul class="nav navbar-header">
        <li class="dropdown">
{#          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"#}
{#             aria-expanded="false">#}
{#            <img src="{{ request.user.get_avatar_uri }}"#}
{#                 class="avatar img-circle img-responsive" alt="{{ request.user.username }}">#}
{#            {% if request.user.unread_count %}#}
{#              <span class="avatar-messages">{{ request.user.unread_count }}</span>#}
{#            {% endif %}#}
{#          </a>#}
          <ul class="dropdown-menu inverse-dropdown">
              <li>{% trans 'Settings' %}</li>
            <li>{% trans 'Messages' %}</li>
            <li role="separator" class="divider"></li>
{#            <li>{% trans 'My Datas' %}</li>#}
              <li><a href="{% url 'storage:add_data' %}">{% trans 'My Datas' %}</a></li>
              <li><a href="{% url 'storage:my_template' %}">{% trans 'My Template' %}</a></li>
            <li>{% trans 'My Models' %}</li>
            <li>{% trans 'My Tasks' %}</li>
{#            <li><a href="{% url 'account:my_info' %}">{% trans 'Settings' %}</a></li>#}
{#            <li><a href="{% url 'account:notifications' %}">{% trans 'Messages' %}</a></li>#}
{#            <li role="separator" class="divider"></li>#}
{#            <li><a href="{% url 'management:my_datasets' %}">{% trans 'My Datas' %}</a></li>#}
{#            <li><a href="{% url 'management:my_models' %}">{% trans 'My Models' %}</a></li>#}
{#            <li><a href="{% url 'management:my_tasks' %}">{% trans 'My Tasks' %}</a></li>#}
            <li role="separator" class="divider"></li>
            <li><a href="javascript:void(0)" onclick="logout()">{% trans 'Sign Out' %}</a></li>
          </ul>
        </li>
{#      {% else %}#}
{#        <ul class="nav navbar-nav">#}
{#        <li>#}
{#            <a href="#">#}
{#          <a href="{% url 'account:login' %}">#}
{#                <i class="fa fa-sign-in" aria-hidden="true"></i>#}
{#                <span>{% trans 'Sign In' %}&nbsp;/&nbsp;{% trans 'Sign Up' %}</span>#}
{#            </a>#}
{#          </a>#}
{#        </li>#}
{#      {% endif %}#}
      </ul>
    </div>
  </div>
</nav>
